
import System
import System.IO

class SingleUnittestFileFinder:
		files = {}
		_unittestFileName as string
		
		def constructor(unittestFileName as string):
		   _unittestFileName = unittestFileName
		
		def HasUnittest(name as FileInfo):
			if(name.Directory.FullName.Contains("\\obj\\")):
				return false
			else:
				return true
		
		def GetUnittest(name as FileInfo):
			return files[0]
		
		def FindTests(dirName as string):
				try:
	             for d in Directory.GetDirectories(dirName):
	                  for f in Directory.GetFiles(d,"*.dll"):
	          	           filename = f
	                      if(filename.Contains(_unittestFileName) and not filename.Contains("\\obj\\")):
	                           files[filename] = filename
	                           print filename
	                  FindTests(d)
	         except ex:
	            print ex.Message

